package cloud.ben.smallscalepigfarmmanagementsystem.entity.fodder;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @Author: Ben
 * @Date: 2022/3/29 23:29
 */
@Data
@TableName("fodder")
@ApiModel(description = "饲料信息表")
@ToString
@NoArgsConstructor
public class Fodder {

    /**
     * 饲料id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(required = true,value = "饲料id")
    private Integer id;

    /**
     *饲料名
     */
    @ApiModelProperty(required = true,value = "饲料名")
    @NotNull(message = "饲料名为空")
    private String fodderName;

    /**
     * 饲料生产地
     */
    @ApiModelProperty(required = true,value = "饲料生产地")
    @NotNull(message = "饲料生产地为空")
    private String fodderYield;

    /**
     * 饲料状态
     */
    @ApiModelProperty(required = true,value = "饲料状态")
    @NotNull(message = "饲料状态为空")
    private String fodderStatus;


    public Fodder(Integer id, String fodderName, String fodderYield, String fodderStatus) {
        this.id = id;
        this.fodderName = fodderName;
        this.fodderYield = fodderYield;
        this.fodderStatus = fodderStatus;
    }

    public Fodder(String fodderName, String fodderYield, String fodderStatus) {
        this.fodderName = fodderName;
        this.fodderYield = fodderYield;
        this.fodderStatus = fodderStatus;
    }
}
